import request from "@/utils/request";

/// <summary>
/// PC获取所有vip用户
/// </summary>
/// <returns></returns>
export const Get_offline_orders = async (obj: any): Promise<any> => {
  return request({
    url: "/OfflineOrders/Get_offline_orders",
    method: "get",
    params: obj,
  });
};

/**
 * 删除订单
 * @param obj
 * @returns
 */
export const dele_offline_orders = async (obj?: { id: string }): Promise<any> => {
  return request({
    url: "/OfflineOrders/dele_offline_orders",
    method: "post",
    data: obj,
  });
};

/// <summary>
/// 创建结账订单表
/// </summary>
/// <returns></returns>
export const add_jz_primary = async (obj: any): Promise<any> => {
  return request({
    url: "/OfflineOrders/add_jz_primary",
    method: "post",
    data: obj,
  });
};

/// <summary>
/// PC获取结账订单
/// </summary>
/// <returns></returns>
export const Get_sys_products = async (obj: any): Promise<any> => {
  return request({
    url: "/OfflineOrders/Get_sys_products",
    method: "get",
    params: obj,
  });
};

/**
 * 完成支付订单
 * @param obj
 * @returns
 */
export const generate_Pay = async (obj?: {
  oid: string;
  money: number;
  payment: string;
}): Promise<any> => {
  return request({
    url: "/OfflineOrders/generate_Pay",
    method: "post",
    data: obj,
  });
};
